package com.storm.common.enums

enum class UserEnabledEnum(val code: Boolean, val intro: String) {
    ENABLED(true,"可用的"),
    DISABLED(false,"不可用的");

    companion object {
        /**
         * 根据code获取用户当前可用状态
         */
        fun getByCode(code: Boolean): UserEnabledEnum? {
            return values().firstOrNull { it.code == code }
        }
    }
}